package com.yllt4cloud.common.ddbase.constant.entity;

public enum AuthorityTypeEnum {
	
	//选择人员授权
	PEPOLE(1),
	//密码授权
	PASSWORD(2),
	//刷卡授权
	CARD(3),
	//指纹授权
	FINGERPRINT(4),
	//app授权
	APP(5);
	
	private int value = 0;

	private AuthorityTypeEnum(int value) {
		this.value = value;
	}
	
	public static AuthorityTypeEnum valueOf(int value) {    //    手写的从int到enum的转换函数
        switch (value) {
        case 1:
            return PEPOLE;
        case 2:
            return PASSWORD;
        case 3:
        	return CARD;
        case 4:
        	return FINGERPRINT;
        case 5:
        	return APP;
        default:
            return null;
        }
    }

    public int value() {
        return this.value;
    }
	
}
